package es.ibm.santillana.mdm.stringenumerationrule;

import com.ibm.pim.context.Context;
import com.ibm.pim.context.PIMContextFactory;
import com.ibm.pim.extensionpoints.CategoryStringEnumerationValueRuleFunctionArguments;
import com.ibm.pim.extensionpoints.CollaborationCategoryStringEnumerationValueRuleFunctionArguments;
import com.ibm.pim.extensionpoints.CollaborationItemStringEnumerationValueRuleFunctionArguments;
import com.ibm.pim.extensionpoints.ItemStringEnumerationValueRuleFunctionArguments;
import com.ibm.pim.extensionpoints.StringEnumerationValueRuleFunction;
import com.ibm.pim.organization.User;

import es.ibm.santillana.mdm.common.bussinesmodel.ConfigModel;
import es.ibm.santillana.mdm.common.util.ConstSantillana;

public class ComboLinga implements StringEnumerationValueRuleFunction {

	//script_execution_mode=java_api="japi:///public_html/clases:es.elcorteingles.n0141.apl2WP.dvd.process.batch.T2WPDN.paralelizado.T2WPDN_DVD_IMG_DOC2.class"
	
	@Override
	public String[] rule(ItemStringEnumerationValueRuleFunctionArguments arg0) {
		
		Context contexto = PIMContextFactory.getCurrentContext();
		
		User usuario = contexto.getCurrentUser();
		//String sCtgName = ConfigModel.getCatalogByAttributeName (arg0.getAttributeInstance().getAttributeDefinition().getName());
		
		String SCode = ConfigModel.getCountryCodeFromUser(usuario);
		
		String[] valores = new String[3];
		valores[0] = usuario.getName();
		valores[1] = usuario.getRoles().iterator().next().getName();
		valores[2] = "Que no me tires coooosssaaaaaaa!!";
		
		return valores;
	}

	@Override
	public String[] rule(
			CategoryStringEnumerationValueRuleFunctionArguments arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String[] rule(
			CollaborationItemStringEnumerationValueRuleFunctionArguments arg0) {
		// TODO Auto-generated method stub
		
		
		
		return null;
	}

	@Override
	public String[] rule(
			CollaborationCategoryStringEnumerationValueRuleFunctionArguments arg0) {
		// TODO Auto-generated method stub
		
		
		
		return null;
	}
	
	
}
